Microsoft Windows Graphic

Understanding logon scripts

A logon script runs automatically whenever a user logs on to a computer running a member of the Windows Server 2003 family of operating systems. The script can contain operating system commands, such as those that make network connections or start programs. Logon scripts can also set environment variables to specify information such as the computer search path and the directory for temporary files. A logon script is usually a batch file (.bat or .cmd file name extension), but any executable program can be used.

Logon scripts are optional. You can use them to configure user working environments by creating network connections and starting programs. Logon scripts are useful when you want to affect the user work environment without managing all aspects of it.

Script files are text files that contain script commands. The Windows Server 2003 family of operating systems supports these types of scripts:

After you create a logon script, you can assign it to one or more local users, sites, domains, or organizational units (OUs).

For more information about specific tasks related to assigning scripts, see How To.